package com.example.service;


import com.example.dao.PrescriptionMapper;
import com.example.dao.PrescriptionMapper2;
import com.example.domain.Prescription;
import com.example.domain.Prescription2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class PrescriptionService2 {

    @Autowired
    private PrescriptionMapper2 medicationMapper;

    public List<Prescription2> listAll(int patient_id) {
        return medicationMapper.listAll(patient_id);
    }

    public int insert(Prescription2 prescription) {
        return medicationMapper.insert(prescription);
    }

    public int update(Prescription2 prescription) {
        return medicationMapper.update(prescription);
    }

    public Prescription2 getById(int id) {
        return medicationMapper.getById(id);
    }
}
